﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Data;

namespace GioHangViet.Models
{
    [Table("Promotions")]
    public class Promotion
    {

        /// <summary>
        /// Biệt danh khuyết mại.
        /// </summary>
        [Key]
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayPromotionAlias")]
        [Required(ErrorMessageResourceName = "ErrorPromotionAlias", ErrorMessageResourceType = typeof(Resources.Error))]
        public string Alias { get; set; }

        /// <summary>
        /// Tiêu đề khuyến mại.
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayPromotionTitle")]
        [Required(ErrorMessageResourceName = "ErrorPromotionTitle", ErrorMessageResourceType = typeof(Resources.Error))]
        public string Title { get; set; }

        /// <summary>
        /// Mô tả khuyến mại.
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayPromotionDescription")]
        [Required(ErrorMessageResourceName = "ErrorPromotionDescription", ErrorMessageResourceType = typeof(Resources.Error))]
        public string Description { get; set; }

        /// <summary>
        /// Giá trị khuyến mại.
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayPromotionPromotionPercent")]
        [Required(ErrorMessageResourceName = "ErrorPromotionPromotionPercent", ErrorMessageResourceType = typeof(Resources.Error))]
        public double PromotionPercent { get; set; }

        /// <summary>
        /// Ngày bắt đầu.
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayPromotionStartDate")]
        [Required(ErrorMessageResourceName = "ErrorPromotionStartDate", ErrorMessageResourceType = typeof(Resources.Error))]
        public DateTime StartDate { get; set; }

        /// <summary>
        /// Ngày kết thúc.
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayPromotionEndDate")]
        [Required(ErrorMessageResourceName = "ErrorPromotionEndDate", ErrorMessageResourceType = typeof(Resources.Error))]
        public DateTime EndDate { get; set; }

        /// <summary>
        /// Ngày tạo
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayPromotionCreateDate")]
        [Required(ErrorMessageResourceName = "ErrorProductCreateDate", ErrorMessageResourceType = typeof(Resources.Error))]
        public DateTime CreateDate { get; set; }

        /// <summary>
        /// người tạo
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayPromotionCreateBy")]
        [Required(ErrorMessageResourceName = "ErrorProductCreateBy", ErrorMessageResourceType = typeof(Resources.Error))]
        public string CreateBy { get; set; }
        
    }
}